import React, { Component } from 'react';
import { NavLink } from 'react-router-dom';
class App extends Component {
	constructor (props) {
	    super(props);
			this.state = {
				list: [
					{
						icon: 'iconfont icon-shouye',
						name: '首页',
						path: '/home'
					},
					{
						icon: 'iconfont icon-fenlei',
						name: '分类',
						path: '/kind'
					},
					{
						icon: 'iconfont icon-gouwudai',
						name: '购物袋',
						path: '/cart'
					},
					{
						icon: 'iconfont icon-wo',
						name: '我的',
						path: '/user'
					}
				]
			}
	}
  render() {
		
    return (
      <div className="footer">
				<ul>
				{
					this.state.list.map((item,index) => {
						return (
							<li key={ index }> 
								<NavLink to = { item.path }>
									<span className={ item.icon }></span>
									<p>{ item.name }</p>
								</NavLink>
							</li>
						)
					})
				}
				</ul>
      </div>
    );
  }
}
export default App;